#ifndef RTP_PARSE_CONSUMER_H
#define RTP_PARSE_CONSUMER_H

#include "rtp/RtpPacket.h"
#include "rtp/ReceiverReport.h"

class Consumer {
public:
    class Listener {
    public:
        virtual ~Listener() = default;
    public:
        virtual void OnConsumerSendRtpPacket(Consumer *consumer, Rtp::RtpPacket *packet) = 0;
        virtual void OnConsumerRetransmitRtpPacket(Consumer *consumer, Rtp::RtpPacket *packet) = 0;
        virtual void OnConsumerKeyFrameRequested(Consumer *consumer, uint32_t mappedSsrc) = 0;
        virtual void OnConsumerNeedBitrateChange(Consumer *consumer);
        virtual void OnConsumerProducerClosed(Consumer *consumer);
    };

    public:
        struct Layers {
            int16_t spatial{ -1 };
            int16_t temporal{ -1 };
        };
    
    private:
        struct TraceEventTypes {

        };
    public:
        virtual bool IsActive() const {
            return false;
        }

        virtual void ReceiveRtcpReceiverReport(Rtp::Rtcp::ReceiverReport *report) = 0;
        virtual void ReceiveKeyFrameRequest(Rtp::Rtcp::FeedbackPs::MessageType messageType, uint32_t ssrc);
        virtual float GetRtt() const;
};

#endif